package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.ProRightsEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 商品权益关联表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-12-15 16:54:15
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ProRightsQuery extends ProRightsEntity implements Query<ProRightsEntity> {

    /** ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 权益ID查询条件 */
	@JsonUnwrapped(prefix = "rightsId")
	private Condition<String> rightsIdCondition;

    /** 权益名称查询条件 */
	@JsonUnwrapped(prefix = "rightsName")
	private Condition<String> rightsNameCondition;

    /** 商品ID查询条件 */
	@JsonUnwrapped(prefix = "goodsId")
	private Condition<String> goodsIdCondition;

    /** 商品名称查询条件 */
	@JsonUnwrapped(prefix = "goodsName")
	private Condition<String> goodsNameCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ProRightsQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ProRightsQuery(ProRightsEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ProRightsQuery(ProRightsQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.rightsIdCondition != null) {
			this.rightsIdCondition = other.rightsIdCondition.copy();
		}
		if(other.rightsNameCondition != null) {
			this.rightsNameCondition = other.rightsNameCondition.copy();
		}
		if(other.goodsIdCondition != null) {
			this.goodsIdCondition = other.goodsIdCondition.copy();
		}
		if(other.goodsNameCondition != null) {
			this.goodsNameCondition = other.goodsNameCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ProRightsEntity> toQueryWrapper() {
		QueryWrapper<ProRightsEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (rightsIdCondition != null) {
			rightsIdCondition.toWrapper(wrapper, COL_RIGHTS_ID);
		}
		if (rightsNameCondition != null) {
			rightsNameCondition.toWrapper(wrapper, COL_RIGHTS_NAME);
		}
		if (goodsIdCondition != null) {
			goodsIdCondition.toWrapper(wrapper, COL_GOODS_ID);
		}
		if (goodsNameCondition != null) {
			goodsNameCondition.toWrapper(wrapper, COL_GOODS_NAME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回ID查询条件
	 * 
	 * @return idCondition ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取ID查询条件
	 * 
	 * @return idCondition ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置ID查询条件
	 * 
	 * @param idCondition ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回权益ID查询条件
	 * 
	 * @return rightsIdCondition 权益ID查询条件
	 */
	public Condition<String> rightsId() {
		this.rightsIdCondition = new Condition<>();
		return this.rightsIdCondition;
	}
	
	/**
	 * 获取权益ID查询条件
	 * 
	 * @return rightsIdCondition 权益ID查询条件
	 */
	public Condition<String> getRightsIdCondition() {
		return rightsIdCondition;
	}

	/**
	 * 设置权益ID查询条件
	 * 
	 * @param rightsIdCondition 权益ID查询条件
	 */
	public void setRightsIdCondition(Condition<String> rightsIdCondition) {
		this.rightsIdCondition = rightsIdCondition;
	}

	/**
	 * 构造并返回权益名称查询条件
	 * 
	 * @return rightsNameCondition 权益名称查询条件
	 */
	public Condition<String> rightsName() {
		this.rightsNameCondition = new Condition<>();
		return this.rightsNameCondition;
	}
	
	/**
	 * 获取权益名称查询条件
	 * 
	 * @return rightsNameCondition 权益名称查询条件
	 */
	public Condition<String> getRightsNameCondition() {
		return rightsNameCondition;
	}

	/**
	 * 设置权益名称查询条件
	 * 
	 * @param rightsNameCondition 权益名称查询条件
	 */
	public void setRightsNameCondition(Condition<String> rightsNameCondition) {
		this.rightsNameCondition = rightsNameCondition;
	}

	/**
	 * 构造并返回商品ID查询条件
	 * 
	 * @return goodsIdCondition 商品ID查询条件
	 */
	public Condition<String> goodsId() {
		this.goodsIdCondition = new Condition<>();
		return this.goodsIdCondition;
	}
	
	/**
	 * 获取商品ID查询条件
	 * 
	 * @return goodsIdCondition 商品ID查询条件
	 */
	public Condition<String> getGoodsIdCondition() {
		return goodsIdCondition;
	}

	/**
	 * 设置商品ID查询条件
	 * 
	 * @param goodsIdCondition 商品ID查询条件
	 */
	public void setGoodsIdCondition(Condition<String> goodsIdCondition) {
		this.goodsIdCondition = goodsIdCondition;
	}

	/**
	 * 构造并返回商品名称查询条件
	 * 
	 * @return goodsNameCondition 商品名称查询条件
	 */
	public Condition<String> goodsName() {
		this.goodsNameCondition = new Condition<>();
		return this.goodsNameCondition;
	}
	
	/**
	 * 获取商品名称查询条件
	 * 
	 * @return goodsNameCondition 商品名称查询条件
	 */
	public Condition<String> getGoodsNameCondition() {
		return goodsNameCondition;
	}

	/**
	 * 设置商品名称查询条件
	 * 
	 * @param goodsNameCondition 商品名称查询条件
	 */
	public void setGoodsNameCondition(Condition<String> goodsNameCondition) {
		this.goodsNameCondition = goodsNameCondition;
	}

}
